package com.xk857.simpleeffect.domain.entity;

import com.google.gson.annotations.SerializedName;

import java.time.LocalDateTime;
import java.util.List;

public class Customer {


    @SerializedName("id")
    private Integer id;
    @SerializedName("wxId")
    private String wxId;
    @SerializedName("nickName")
    private String nickName;
    @SerializedName("qqId")
    private String qqId;
    @SerializedName("headImg")
    private String headImg;
    @SerializedName("createTime")
    private List<Integer> createTime;
    @SerializedName("phone")
    private String phone;
    @SerializedName("preSign")
    private String preSign;
    @SerializedName("sessionKey")
    private String sessionKey;
    @SerializedName("deleted")
    private Boolean deleted;
    @SerializedName("username")
    private String username;
    @SerializedName("password")
    private String password;
    @SerializedName("token")
    private String token;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getWxId() {
        return wxId;
    }

    public void setWxId(String wxId) {
        this.wxId = wxId;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getQqId() {
        return qqId;
    }

    public void setQqId(String qqId) {
        this.qqId = qqId;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    public LocalDateTime getCreateTime() {
        if (createTime.size() == 5) {
            return LocalDateTime.of(createTime.get(0), createTime.get(1), createTime.get(2), createTime.get(3), createTime.get(4), 0);
        }
        return LocalDateTime.of(createTime.get(0), createTime.get(1), createTime.get(2), createTime.get(3), createTime.get(4), createTime.get(5));
    }

    public void setCreateTime(List<Integer> createTime) {
        this.createTime = createTime;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPreSign() {
        return preSign;
    }

    public void setPreSign(String preSign) {
        this.preSign = preSign;
    }

    public String getSessionKey() {
        return sessionKey;
    }

    public void setSessionKey(String sessionKey) {
        this.sessionKey = sessionKey;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public String toString() {
        return "Customer{" +
                "id=" + id +
                ", wxId='" + wxId + '\'' +
                ", nickName='" + nickName + '\'' +
                ", qqId='" + qqId + '\'' +
                ", headImg='" + headImg + '\'' +
                ", createTime=" + getCreateTime() +
                ", phone='" + phone + '\'' +
                ", preSign='" + preSign + '\'' +
                ", sessionKey='" + sessionKey + '\'' +
                ", deleted=" + deleted +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", token='" + token + '\'' +
                '}';
    }
}
